<extend name="Public/base"/>
<block name="sidebar">
    <include file="sidemenu"/>
</block>
<block name="body">
    <div class="main-title">
        <h2>节点修改</h2>
    </div>
    <form action="{:U('update_root')}" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">节点名称</label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$self['name']}">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">节点等级</label>
            <div class="controls">
                <input class="text input-large" type="text" readonly value="{$self['level']}" name="level">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">上级节点</label>
            <div class="controls">
                <input class="text input-large" type="text" readonly value="{$parent['name']}">
                <input type="text" hidden readonly value="{$self['pid']}" name="pid">
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">节点类型</label>
            <div class="controls">
                <select name="type" class="input-large">
                    <if condition="$self['level'] neq 3">
                        <option value ="" <eq name="self['type']" value="">selected="selected"</eq>>--父节点--</option>
                        <else />
                        <option value ="checkbox" <eq name="self['type']" value="checkbox">selected="selected"</eq>>复选框</option>
                        <option value ="text" <eq name="self['type']" value="text">selected="selected"</eq>>输入框</option>
                    </if>
                </select>
            </div>
        </div>
        <div class="form-item">
            <label class="item-label">备注</label>
            <div class="controls">
                <input type="text" class="text input-large" name="remark" value="{$self['remark']}">
            </div>
        </div>
        <input type="text" hidden readonly name="bid" value="{$self['bid']}">
        <input type="text" hidden readonly name="id" value="{$self['id']}">
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
        </div>
    </form>
</block>
